package wc.assignmentPhrase;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;

public abstract class AssignmentPhrase implements IAssignmentPhrase {

	private List<Map.Entry<String, String>> _orderPhrase = new ArrayList<Map.Entry<String,String>>();
	
	public AssignmentPhrase() {};
	
	@Override
	public List<Entry<String, String>> getTopPhrase(int count) {
		return _orderPhrase.subList(0, count);
	}
	
	@SuppressWarnings("unchecked")
	protected void addPhrase(String word1, String word2) {
		Map<String, String> phrase = new HashMap<String, String>();
		phrase.put(word1, word2);
		_orderPhrase.add(((List<Map.Entry<String, String>>) phrase.entrySet()).get(0));
	}
	
	public abstract void createOrderPhrase(HashMap<Map.Entry<String, String>, Integer> _phrases);

}
